<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伪元素应用场景-字体图标.html</title>
    <style>
        div {
            width: 300px;
            height: 80px;
            position: relative;
            border: 1px solid red;
        }
        div::after {
            content: '右边';
            position: absolute;
            margin-top: -10px;
            top: 50%;
            right: 0;

        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>